package com.pro;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;



@SpringBootApplication
@MapperScan(basePackages = "com.pro.mapper")
//extends SpringBootServletInitializer  war包
public class SiyunApplication extends SpringBootServletInitializer{

    private static int a = 100;
    static int num(){
        try{
            int b = 10;
            int c = 0;
            //System.out.println(b / c);
        } catch (Exception e) {
            a = 150;
            System.out.println("catch"+a);
            return a;
        }finally {
            System.out.println("finally"+a);
        }
        return 99999;
    }

    //        Map<String,String> map = new HashMap<>();
//        map.put("熊大", "棕色");
//        map.put("熊二", "黄色");
//        for(Map.Entry<String, String> entry : map.entrySet()){
//            String mapKey = entry.getKey();
//            String mapValue = entry.getValue();
//            System.out.println(mapKey+":"+mapValue);
//        }
    public static void main(String[] args) {
        SpringApplication.run(SiyunApplication.class, args);
        Logger logger = Logger.getGlobal();
        logger.info("─────▄████▀█▄");
        logger.info("───▄█████████████████▄");
        logger.info("─▄█████.▼.▼.▼.▼.▼.▼▼▼▼");
        logger.info("▄███████▄.▲.▲▲▲▲▲▲▲▲");
        logger.info("████████████████████▀▀");
        logger.info("start up");
        //num();
    }


    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SiyunApplication.class);
    }
}
